/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.goods.entity;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.test.entity.TestData;
import com.jeesite.modules.xcxAdmin.entity.ZtAdmin;

/**
 * 测试数据Entity
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Table(name = "zt_comment", alias = "a", columns = {
		@Column(name = "id", attrName = "id", label = "编号", isPK = true),
		@Column(name = "content_id", attrName = "ztGoods.id", label = "商品id"),
		@Column(name = "content", attrName = "content", label = "内容"),
		@Column(name = "imgs", attrName = "imgs", label = "图片"),
		@Column(name = "admin_id", attrName = "ztAdmin.id", label = "用户id"),
		@Column(name = "ip", attrName = "ip", label = "ip"),
		@Column(name = "zan", attrName = "zan", label = "zan"),
		@Column(name = "create_date", attrName = "createDate", label = "时间"),
		@Column(name = "status", attrName = "status", label = "状态"),
		@Column(name = "star", attrName = "star", label = "评分"),

}, joinTable = {
		@JoinTable(type = Type.LEFT_JOIN, entity = ZtAdmin.class, attrName = "ztAdmin", alias = "z", on = "z.id = a.admin_id", columns = {
				@Column(name = "name", label = "名字", attrName = "name", queryType = QueryType.LIKE),
				@Column(name = "headimgurl", label = "头像"), }),

		@JoinTable(type = Type.LEFT_JOIN, entity = ZtGoods.class, attrName = "ztGoods", alias = "g", on = "g.id = a.content_id", columns = {
				@Column(name = "id", label = "编码", isPK = true),
				@Column(name = "title", label = "商品名称",attrName = "title", queryType = QueryType.LIKE), })

}, orderBy = "a.create_date DESC")
public class ZtComment extends DataEntity<ZtComment>{

	private static final long serialVersionUID = 1L;

	private String id;
	private ZtGoods ztGoods;
	private String content;
	private String imgs;
	private String ip;
	
	private String status;
	private ZtAdmin ztAdmin;
	private String star;
	
	private Integer pageNum;
	private Integer zan;
	
	private String zanSign="0";//0未点赞    1已点赞
	
	
	
	public String getZanSign() {
		return zanSign;
	}

	public void setZanSign(String zanSign) {
		this.zanSign = zanSign;
	}

	@JsonIgnore
	private Date createDate;
	@JsonIgnore
	private String updateBy;
	@JsonIgnore
	private String createBy;
	@JsonIgnore
	private Date updateDate;

	public Integer getZan() {
		return zan;
	}

	public void setZan(Integer zan) {
		this.zan = zan;
	}

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public ZtGoods getZtGoods() {
		return ztGoods;
	}

	public void setZtGoods(ZtGoods ztGoods) {
		this.ztGoods = ztGoods;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getImgs() {
		return imgs;
	}

	public void setImgs(String imgs) {
		this.imgs = imgs;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	@JsonIgnore
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public ZtAdmin getZtAdmin() {
		return ztAdmin;
	}

	public void setZtAdmin(ZtAdmin ztAdmin) {
		this.ztAdmin = ztAdmin;
	}

	public String getStar() {
		return star;
	}

	public void setStar(String star) {
		this.star = star;
	}

}